package com.example.basestationforballonproject.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class AlertHelper {

	@SuppressWarnings("deprecation")
	public static AlertDialog getDialog(String title, String text, Context context) {

		final AlertDialog alertDialog = new AlertDialog.Builder(context).create();

		alertDialog.setTitle(title);
		alertDialog.setMessage(text);

		alertDialog.setButton("Ok", new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface dialog, int which) {
				alertDialog.cancel();
			}
		});

		alertDialog.setCancelable(true);
		return alertDialog;
	}
}
